package xyz.zdsoft.attendance_manage_module.service.imp;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;
import xyz.zdsoft.attendance_manage_module.bo.AdminAttendanceInfoBo;
import xyz.zdsoft.attendance_manage_module.mapper.AdminAttendanceMapper;
import xyz.zdsoft.attendance_manage_module.service.AdminAttendanceService;
import xyz.zdsoft.attendance_manage_module.vo.AdminAttendanceInfoVo;
import xyz.zdsoft.project_group_manage_module.entity.MyDto.RespPageBean;
import javax.annotation.Resource;
@Service
public class AdminAttendanceServiceImpl implements AdminAttendanceService {
    @Resource
    private AdminAttendanceMapper adminAttendanceMapper;

    @Override
    public RespPageBean TermSelAttendance(Integer currentPage, Integer size, AdminAttendanceInfoBo adminAttendanceInfoBo) {
        //开启分页
        Page<AdminAttendanceInfoVo> page=new Page<>(currentPage,size);
        IPage<AdminAttendanceInfoVo> attendancePage=adminAttendanceMapper.TermSelAttendance(page,adminAttendanceInfoBo);
        return new RespPageBean(attendancePage.getTotal(),attendancePage.getRecords());

    }
}
